<!DOCTYPE html>
<html>
<head>
    <title>门店列表</title>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <link rel="stylesheet" href="../../../css/bootstrap.min.css">
    <link rel="stylesheet" href="../../../css/font-awesome.min.css">
    <link rel="stylesheet" href="../../../plugins/jqgrid/ui.jqgrid-bootstrap.css">
    <link rel="stylesheet" href="../../../plugins/ztree/css/metroStyle/metroStyle.css">
    <link rel="stylesheet" href="../../../css/main.css">
    <!--<link rel="stylesheet" href="../../../css/validation.css">-->
    <link rel="stylesheet" type="text/css"
          href="../../../plugins/webuploader/css/webuploader.css">
    <link rel="stylesheet" type="text/css"
          href="../../../plugins/webuploader/css/auto.css">
    <script src="../../../libs/jquery.min.js"></script>
    <script src="../../../plugins/layer/layer.js"></script>
    <script src="../../../libs/bootstrap.min.js"></script>
    <script src="../../../libs/vue.min.js"></script>
    <!--<script src="../../../libs/messages_cn.js"></script> -->
    <!--<script src="../../../libs/jquery.validate.min.js"></script>-->
    <script src="../../../plugins/jqgrid/grid.locale-cn.js"></script>
    <script src="../../../plugins/jqgrid/jquery.jqGrid.min.js"></script>
    <script src="../../../plugins/ztree/jquery.ztree.all.min.js"></script>
    <script src="../../../js/common.js"></script>
    <script src="../../../libs/ajaxupload.js"></script>
    <script type="text/javascript"
            src="../../../plugins/webuploader/js/webuploader_back.js"></script>
    <script type="text/javascript"
            src="../../../plugins/webuploader/js/auto_back.js"></script>
    <script type="text/javascript"
            src="../../../plugins/webuploader/js/auto_back.js"></script>
</head>
<body>
<div id="dcapp" v-cloak>
    <div v-show="showList">
        <div class="grid-btn">
            <div class="form-group col-sm-2">
                <input type="text" class="form-control" v-model="q.key" @keyup.enter="query" placeholder="名称、姓名、手机号">
            </div>
            <a class="btn btn-default" @click="query">查询</a>
            <a v-if="hasPermission('sys:user:save')" class="btn btn-primary" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</a>
            <a v-if="hasPermission('sys:user:update')" class="btn btn-primary" @click="update"><i
                    class="fa fa-pencil-square-o"></i>&nbsp;修改</a>
        </div>
        <table id="jqGrid"></table>
        <div id="jqGridPager"></div>
    </div>

    <div v-show="!showList" class="panel panel-default">
        <div class="panel-heading">{{title}}</div>
        <form class="form-horizontal">

            <div>
                <div class="form-group">
                    <div class="col-sm-2 control-label">门店名称</div>
                    <div class="col-sm-10">
                        <input type="text" class="form-control required" v-model="store.name"
                               v-validate="'required|max:15'"
                               name="门店名称"/>
                        <!--<span v-show="errors.has('门店名称')" class="help">{{ errors.first('门店名称') }}</span>-->
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-2 control-label">经营范围</div>
                    <div class="col-sm-10">
                        <select class="form-control required" v-model="store.bizTypeId" v-validate="'required'"
                                name="经营范围">
                            <option v-for="option in options" :value="option.id">
                                {{ option.name }}
                            </option>
                        </select>
                        <!--<span v-show="errors.has('经营范围')" class="help">{{ errors.first('经营范围') }}</span>-->

                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-2 control-label">门店地址</div>
                    <div class="col-sm-10 img">
                        <div name="areaDiv">
                            <select name="cardProvince" id="cardProvince" class="required selector1 form-control"
                                    v-model="store.province" :areaCode="store.province"></select>
                            <select name="cardCity" id="cardCity" class="required selector1 form-control"
                                    v-model="store.city" :areaCode="store.city"></select>
                            <select name="cardDistrict" id="cardDistrict" class="required selector1 form-control"
                                    v-model="store.district" :areaCode="store.district"></select>
                        </div>
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-2 control-label">详细地址</div>
                    <div class="col-sm-10">
                        <input type="text" class="form-control required" v-model="store.address"/>
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-2 control-label">联系电话</div>
                    <div class="col-sm-10">
                        <input type="text" class="form-control required" v-model="store.mobilePhone"/>
                    </div>
                </div>

                <div class="form-group">

                    <div class="col-sm-2 control-label">门店头像</div>

                    <div class="wu-example uploader col-sm-10" id="upload_logo">
                        <!--<%&#45;&#45; 文件队列区域 &#45;&#45;%>-->
                        <div class="queueList">
                            <!--<%&#45;&#45; 拖拽区域 &#45;&#45;%>-->
                            <div class="placeholder dndArea">
                                <div class="webuploader-container filePicker">
                                    <div class="webuploader-pick">选择图片</div>
                                </div>
                                <!-- <p>您还可以将照片拖到这里或使用截屏工具后激活本窗口并粘贴</p> -->
                            </div>
                            <!--<%&#45;&#45; 文件列表 &#45;&#45;%>-->
                            <ul class="filelist"></ul>
                        </div>
                        <!--<%&#45;&#45; 状态按钮区域 &#45;&#45;%>-->
                        <div class="statusBar" style="display: none;">
                            <div class="progress" style="display: none;">
                                <span class="text">0%</span> <span class="percentage"
                                                                   style="width: 0%;"></span>
                            </div>
                            <!--<%&#45;&#45;<div class="info">共0张（0B），已上传0张</div>&#45;&#45;%>-->
                            <div class="btns">
                                <div class="webuploader-container filePicker2">
                                    <div class="webuploader-pick">继续添加</div>
                                </div>
                                <!-- <div class="uploadBtn state-pedding">开始上传</div> -->
                            </div>
                        </div>
                    </div>
                </div>


                <div class="form-group">
                    <div class="col-sm-2 control-label"></div>
                    <input type="button" class="btn btn-primary" @click="saveOrUpdate" value="确定"/>
                    &nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reload" value="返回"/>
                </div>
            </div>
        </form>
        <!-- 仅放大显示 -->
        <div id="imgId" style="display: none;">
            <img alt="" src="" id="showimg" width="800px">
        </div>
    </div>
</div>

<script src="../../../js/modules/merchant/store/storeList.js"></script>
</body>
</html>